<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">

  {{ partial "head.html" . }}

  <body>

    <div id="all">

        <header>

          {{ partial "nav.html" . }}

        </header>

        {{ partial "breadcrumbs.html" . }}

        <div id="content">
            <div class="container">
                <div class="row">
                    <!-- *** LEFT COLUMN *** -->

                    <div class="col-md-12" id="blog-listing-medium">

                        {{ $paginator := .Paginate (where .Data.Pages "Type" "news") 5 }}
                        {{ range $paginator.Pages }}
                        <div class="newsDetail">
                            <div class="newsDetail_content">
                                <div class="newsDetail_content_warp">
                                    <div class="newsDetail_content_left">
                                        <a href="{{ .Permalink }}">
                                            {{ if .Params.banner }}
                                            <img src="{{ .Site.BaseURL}}{{ .Params.banner }}">
                                            {{ else }}
                                            <img src="{{ .Site.BaseURL}}img/banners/placeholder.png">
                                            {{ end }}
                                        </a>
                                    </div>
                                    <div class="newsDetail_content_right">
                                        <h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
                                        <p class="newsDetail_right_tips">
                                            <span>
                                                {{ if isset .Params "author" }}
                                                {{ .Params.author }}
                                                {{ end }}
                                                {{ if isset .Params "categories" }}
                                                {{ if gt (len .Params.categories) 0 }}
                                                in <a href="{{ $.Site.BaseURL }}categories/{{ index .Params.categories 0 | urlize | lower }}">{{ index .Params.categories 0 }}</a>
                                                {{ end }}
                                                {{ end }}
                                            </span>
                                            <span>{{ .Date.Format .Site.Params.date_format }}</span>
                                        </p>
                                        <p class="newsDetail_right_content"><a href="{{ .Permalink }}">{{ .Params.Summary }}</a></p>
                                        <div class="newsDetail_right_btn">
                                            <a  href="{{ .Permalink }}" class="btn btn-template-main">{{ i18n "full_text" }}</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                        </div>
                        {{ end }}

                        <ul class="pager">
                            {{ if .Paginator.HasPrev }}
                            <li class="previous"><a href="{{ .Site.BaseURL }}{{ .Paginator.Prev.URL }}">&larr; {{ i18n "newer" }}</a></li>
                            {{ else }}
                            <li class="previous disabled"><a href="javaScript:;">&larr; {{ i18n "newer" }}</a></li>
                            {{ end }}

                            {{ if .Paginator.HasNext }}
                            <li class="next"><a href="{{ .Site.BaseURL }}{{ .Paginator.Next.URL }}">{{ i18n "older" }} &rarr;</a></li>
                            {{ else }}
                            <li class="next disabled"><a href="javaScript:;">{{ i18n "older" }} &rarr;</a></li>
                            {{ end }}
                        </ul>
                    </div>
                    <!-- /.col-md-9 -->
                </div>
                <!-- /.row -->
            </div>
            <!-- /.container -->
        </div>
        <!-- /#content -->

        {{ partial "footer.html" . }}

    </div>
    <!-- /#all -->

    {{ partial "scripts.html" . }}

  </body>
</html>
